﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Quality.BasicData;
using Quality.Records;
using Quality.spc;
using System.Data.SqlClient;
namespace Quality
{  //声明委托 和 事件
    public delegate void TransfDelegate1();
  
    public delegate void TransfDelegate(String[] value);
    public delegate void TransfDelegatedt(DataTable value);
    public partial class MainForm : Form
    {
        
        public MainForm()
        {
          
            InitializeComponent();
        }

     

        private void MainForm_Load(object sender, EventArgs e)
        {
            this.hello_toolStripStatusLabel.Text = "欢迎" + sqlHelper.loginname;
            

        }
        private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            System.Environment.Exit(0);
        }
     

        private void 产品资料ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            products frm = new products();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
           
            frm.Show();
        }

        private void 客户ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            customers frm = new customers();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
           
            frm.Show();
        }

        private void 供应商ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            suppliers frm = new suppliers();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
           
            frm.Show();
        }

        private void 报告分类ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            testclass frm = new testclass();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
           
            frm.Show();

        }

        private void 检验类型ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            testtypes frm = new testtypes();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
           
            frm.Show();
        }

        private void 检验项目ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            testitems frm = new testitems();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
        
            frm.Show();
        }

        private void 检验指标ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            testindicators frm = new testindicators();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
            
            frm.Show();

        }

        private void 分配项目toolStripMenuItem1_Click(object sender, EventArgs e)
        { assigneditems frm = new assigneditems();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
         
            frm.Show();

        }

        private void 分配指标toolStripMenuItem2_Click(object sender, EventArgs e)
        {
            assignedindicators frm = new assignedindicators();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
           
            frm.Show();
        }

        private void 组织机构ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            organization frm = new organization();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
         
            frm.Show();
        }

        private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            users frm = new users();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
          
            frm.Show();

        }

        private void 班次ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            shift frm = new shift();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
           
            frm.Show();

        }

        private void 工作中心ToolStripMenuItem_Click(object sender, EventArgs e)
        {
          
                 workcenters frm = new  workcenters();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
           
            frm.Show();
        }

        private void 设备ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            equipments frm = new equipments();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
            
            frm.Show();

        }

        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            add frm = new add();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
         
            frm.Show();
        }

        private void 记录管理ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            manage frm = new manage();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
          
            frm.Show();
        }

        private void 查询ToolStripMenuItem_Click(object sender, EventArgs e)
        { query frm = new query();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
            
            frm.Show();

        }

        private void 基本分析ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            basicAnalysis frm = new basicAnalysis();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
            
            frm.Show();
        }

        private void 正态分布直方图ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Normaldistribution frm = new Normaldistribution();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
          
            frm.Show();
        }

        private void 生成ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Normaldistribution frm = new Normaldistribution();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
          
            frm.Show();
        }

        private void 生成检查表ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            reports frm = new reports();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
          
            frm.Show();

        }

       

        private void 柱状图ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ColumnImage frm = new ColumnImage();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
           
            frm.Show();
        }

        private void 线行图ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            splineImage frm = new splineImage();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
          
            frm.Show();
        }

        private void xBARR图ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XbarR frm = new XbarR();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;
         
            frm.Show();
        }

        private void 正态分布ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Normaldistribution frm = new Normaldistribution();

            frm.WindowState = FormWindowState.Normal;
            frm.Dock = DockStyle.Fill;
            frm.MdiParent = this;
            frm.StartPosition = FormStartPosition.Manual;

            frm.Show();

        }

       

        
    }
}
